import createApp from './create-app'
import bus from './util/bus'
import 'lib-flexible'

const {app, router,store } = createApp()
// 移除移动端页面点击延迟
const FastClick = require('fastclick')
FastClick.attach(document.body)

bus.$on('auth',()=>{
  router.push('/login')
})

if(window.__INITIAL_STATE__){
  store.replaceState(window.__INITIAL_STATE__)
}


router.onReady(() => {
  app.$mount('#root')
})
